From 7620dcc5bbcebe2bee80b9cab70777266c09d831 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Thu, 23 Dec 1993 04:46:18 +0000 Subject: [PATCH] (c-delete-backslash): Do nothing if empty line. --- lisp/progmodes/c-mode.el | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/lisp/progmodes/c-mode.el b/lisp/progmodes/c-mode.el index 429d0bf2292..ebab0c77130 100644 --- a/lisp/progmodes/c-mode.el +++ b/lisp/progmodes/c-mode.el @@ -1314,10 +1314,12 @@ definition and conveniently use this command." (defun c-delete-backslash () (end-of-line) - (forward-char -1) - (if (looking-at "\\\\") - (delete-region (1+ (point)) - (progn (skip-chars-backward " \t") (point))))) + (or (bolp) + (progn + (forward-char -1) + (if (looking-at "\\\\") + (delete-region (1+ (point)) + (progn (skip-chars-backward " \t") (point))))))) (defun c-up-conditional (count) "Move back to the containing preprocessor conditional, leaving mark behind. -- 2.30.2